#include "userlib.h"

void listresultsets(void)
{
	list<ResultSet *>::iterator it;
	for(it = results.begin(); it != results.end(); it++ )
		(*it)->printinfo();
}

ResultSet * findresultset(int id)
{
	list<ResultSet *>::iterator it;
	if(results.size())
		for(it = results.begin(); it != results.end(); it++ )
			if( (*it)->id == id )
				return (*it);
	return 0;	
}

int deleteresultset(int id)
{
	list<ResultSet *>::iterator it;
	if(results.size())
		for(it = results.begin(); it != results.end(); it++ )
			if( (*it)->id == id ){
				results.erase(it);
				return 0;
			}
	return -1;
}
